﻿using Microsoft.EntityFrameworkCore.ChangeTracking;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WebApi.Entities;
public class User
{

    public User()
{
        Id = Guid.NewGuid();
        Address = new Address();
    }
    public Guid Id { get; set; }
    public string Name { get; set; }

    public Address Address { get; set; }
}

public class Address
{
    public Address()
    {
            Phones = new List<Phone>();
    }
    public string City { get; set; }
    public List<Phone> Phones { get; set; }

    public User User { get; set; }
}


public class Phone
{
    public string Number { get; set; }

    public Address Address { get; set; }
}

